namespace ScrumSprintMonitor.Wpf.Application
{
	#region #using Directives

	using System;
	using System.Windows;

	using PreEmptive.Attributes;

	using UI.Wpf;

	#endregion

	/// <summary>
	///   Interaction logic for App.xaml
	/// </summary>
	public partial class App : Application
	{
		public static bool OptInCEIP
		{
#if DEBUG
			get { return false; }
#else
			get { return Settings.Default.OptInCEIP; }
#endif
		}

		protected override void OnStartup(StartupEventArgs e)
		{
			var bootstrapper = new Bootstrapper();
			bootstrapper.Run();

			base.OnStartup(e);
		}
	}

	class Startup
	{
		[STAThread]
		[Setup(CustomEndpoint = "so-s.info/PreEmptive.Web.Services.Messaging/MessagingServiceV2.asmx", OptInSourceOwner = typeof(App),
			OptInSourceElement = SourceElements.Property, OptInSourceName = "OptInCEIP")]
		[SystemProfile]
		[Teardown]
		static void Main()
		{
			var app = new App();
			app.InitializeComponent();
			app.Run();
		}
	}
}